package utils;

import java.util.logging.FileHandler;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 * Created by IntelliJ IDEA.
 * User: Admin
 * Date: Feb 3, 2010
 * Time: 12:16:51 AM
 * To change this template use File | Settings | File Templates.
 */
public class LoggerHandler {
    public static void createLogMessage(Level level, String message) {
        try {
            Logger logger = Logger.getLogger("MyLog");
            FileHandler fh = new FileHandler("src/log.log", true);
            logger.addHandler(fh);
            logger.log(level, message);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

}
